home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue60 / ClassEng / Listing1.pas next >
Encoding:
Pascal/Delphi Source File  |  2000-06-28  |  359 b   |  15 lines

  1. TMyClass = class
  2. private
  3.   FMyProp1: Integer;
  4.   . . .
  5.   function GetMyProp2: Integer;
  6.   procedure SetMyProp2(Value: Integer);
  7. public
  8.   property MyProp1: Integer read FMyProp1 write FMyProp1;
  9.   property MyProp2: Integer read GetMyProp2 write SetMyProp2;
  10. end;
  11. . . .
  12. // examples of use in code
  13. if MyObject.MyProp1 = 0 then
  14.   MyObject.MyProp2 := 0;
  15.